Switches used in high-speed packet networks, such as Ethernet and InfiniBand networks, typically contain buffer memories. Packets received by the switch through one of its interfaces are stored temporarily in a buffer memory while awaiting transfer to the appropriate egress interface or possibly, in the case of multicast packets, to multiple egress interfaces. Although buffer memory may be allocated statically to each interface, many modern packet switches use a shared memory, in which buffer space is allocated flexibly to different interfaces and queues depending on traffic load and memory availability, as well as packet ingress priority and packet priorities that are set after processing in the switch.
As one example, U.S. Patent Application Publication 2013/0250762 describes a method for achieving lossless behavior for multiple ports sharing a buffer pool. Packets are “colored” and stored in a shared packet buffer without assigning fixed page allocations per port.